<template>
  <div >
    <div class="pgbanner">
      <img src="/static/images/pgbanner1.jpg" alt="">
    </div>
    <div class="pgtitle">
      <div class="word">
        <div class="cn">公司简介</div>
        <div class="en">Company Profile</div>
      </div>
    </div>
    <div style="width: 90%;margin: 20px auto;">
      <div class="info" v-html="list.info" >
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "",
    data() {
      return {
        list: [],
      }
    },
    methods: {
      requestData() {
        const that = this;
        // console.log(that)
        const api = 'https://eztw.com.cn/appabout';
        wx.request({
          url: api, //仅为示例，并非真实的接口地址
          data: {
          },
          header: {
            'content-type': 'application/json' // 默认值
          },
          success: function(res) {
            wx.hideNavigationBarLoading()
            var htmlContent = res.data.info
            console.log('htmlContent')
            res.data.info = htmlContent.replace(/(\<img|\<p)/gi, function ($0, $1) {
              return {
                '<img': '<img style="max-width:100%; display:inherit;height:auto" ',
                '<p': '<p style="margin-bottom: 0px;" ',
              }[$1]
            })
            that.list=res.data;
          }
        })
      },
    },
    /*生命周期函数*/
    onShow(){
      this.requestData()
      wx.showNavigationBarLoading()
    }
  }
</script>

<style scoped>

  .info{
    width: 90%;
    margin:10px auto;
    color: #8d8d8d;
    font-size: 12px;
    line-height: 25px;
    word-break:break-all!important;
    white-space: normal!important;
  }

</style>
